Skip to content

More tests (or rather, examples) #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

qryxip
Copy link
Member

@qryxip qryxip commented Dec 19, 2019

No description provided.

@qryxip qryxip force-pushed the ja-all-enabled-more-tests branch from 83bdc38 to d943d04 Compare December 19, 2019 16:30
@qryxip
Copy link
Member Author

qryxip commented Dec 19, 2019

  • num
    • num-bigint
    • num-complex
    • num-integer
    • num-iter
    • num-rational
    • num-traits
  • num-derive (new)
  • ndarray (new)
  • nalgebra
    • alga
  • libm (new)
  • rand
    • getrandom
    • rand_chacha
    • rand_core
    • rand_hc
    • rand_pcg
  • rand_distr
  • petgraph
  • indexmap
  • regex
  • lazy_static
  • ordered-float
  • ascii
  • permutohedron
  • superslice (new)
  • itertools
  • itertools-num
  • maplit
  • either
  • im-rc
  • fixedbitset
  • bitset-fixed
  • proconio
  • text_io (new)
  • whiteread (new)
  • rustc-hash
  • smallvec (new)

@qryxip qryxip force-pushed the ja-all-enabled-more-tests branch from d943d04 to 86f5f7f Compare December 19, 2019 17:06
@qryxip
Copy link
Member Author

qryxip commented Dec 20, 2019

??? とりあえず空コミットでre-runします。

(edit) re-runしたら普通にパスしました。何だったんでしょう..?

(dep-testsのところ)

error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to load source for a dependency on `aho-corasick`

Caused by:
  Unable to update /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/atcoder-rust-base-dep-tests/aho-corasick-0.7.6

Caused by:
  failed to parse manifest at `/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/atcoder-rust-base-dep-tests/aho-corasick-0.7.6/Cargo.toml`

Caused by:
  can't find library `aho_corasick`, rename file to `src/lib.rs` or specify lib.path

@qryxip qryxip force-pushed the ja-all-enabled-more-tests branch 2 times, most recently from 33bd7e5 to 77803d7 Compare December 20, 2019 06:15
@qryxip
Copy link
Member Author

qryxip commented Dec 20, 2019

proconio, whiteread, text_io単体に対してexampleを書いたのでabc121-bを除いてinput!を使わないようにしました。fastout!はそのままです。

@qryxip qryxip force-pushed the ja-all-enabled-more-tests branch 2 times, most recently from 368229a to bb7e640 Compare December 20, 2019 13:50
@qryxip
Copy link
Member Author

qryxip commented Dec 21, 2019

サンプルテストケースをこのリポジトリに持たないようにしました。

↓のようなBashスクリプトを入れるつもりでしたが折角なのでtest-with-generated-optsの起動時にureqscraperで直にスクレイピングして./target下に保存するようにしました。

#!/bin/bash

set -o pipefail

type jq > /dev/null || exit 1 # `$ sudo apt install jq`
type python3 > /dev/null || exit 1

# - https://github.com/kmyk/online-judge-tools
# - https://github.com/dbohdan/remarshal

if [ ! -d ./target/test-with-generated-opts/venvs/oj ]; then
  python3 -m venv ./target/test-with-generated-opts/venvs/oj &&
  ./target/test-with-generated-opts/venvs/oj/bin/pip3 install -U pip || exit 1
fi

if [ ! -d ./target/test-with-generated-opts/venvs/remarshal ]; then
  python3 -m venv ./target/test-with-generated-opts/venvs/remarshal &&
  ./target/test-with-generated-opts/venvs/remarshal/bin/pip3 install -U pip || exit 1
fi

./target/test-with-generated-opts/venvs/oj/bin/pip3 install -U online-judge-tools || exit 1
./target/test-with-generated-opts/venvs/remarshal/bin/pip3 install -U remarshal || exit 1

rm -rf ./target/test-with-generated-opts/testcases

true > ./target/test-with-generated-opts/testcases/apg4b-a/in/1.txt
echo 'Hello, World!' > ./target/test-with-generated-opts/testcases/apg4b-a/out/1.txt

./target/test-with-generated-opts/venvs/remarshal/bin/remarshal -i ./test-with-generated-opts.toml --of json |
  jq -r '.examples | to_entries[] | select(.key != "apg4b-a") | "-d ./target/test-with-generated-opts/testcases/" + .key + " " + .value.url' |
  xargs -t -n3 ./target/test-with-generated-opts/venvs/oj/bin/oj d -f %e/%i.txt || exit 1

@qryxip
Copy link
Member Author

qryxip commented Dec 21, 2019

test-with-generated-optsの新しい設定ファイルはこんな感じになります。

bin = "./target/test-with-generated-opts/bin/{}"
testcases = "./target/test-with-generated-opts/testcases/{}.json"

[examples.abc054-c]
name = "ABC054: C - One-stroke Path"
url = "https://atcoder.jp/contests/abc054/tasks/abc054_c"
matching = "Words"

@qryxip qryxip force-pushed the ja-all-enabled-more-tests branch 2 times, most recently from a089fdd to 95f748d Compare December 21, 2019 18:57
@qryxip
Copy link
Member Author

qryxip commented Dec 21, 2019

手元でDropboxのやつが入れにくいのでJSONからテキストファイルに戻しました。

@qryxip qryxip force-pushed the ja-all-enabled-more-tests branch from a89ba00 to 2cbcf35 Compare December 31, 2019 02:53
@qryxip qryxip force-pushed the ja-all-enabled-more-tests branch 2 times, most recently from e060343 to d194941 Compare January 10, 2020 16:11
@qryxip qryxip force-pushed the ja-all-enabled-more-tests branch 3 times, most recently from 10a178a to 4ae0c3c Compare January 15, 2020 16:51
@qryxip qryxip force-pushed the ja-all-enabled-more-tests branch from 4ae0c3c to f204639 Compare January 15, 2020 16:52
@qryxip qryxip force-pushed the ja-all-enabled-more-tests branch 2 times, most recently from f50ba72 to 915f859 Compare January 17, 2020 12:19
@qryxip qryxip force-pushed the ja-all-enabled-more-tests branch 2 times, most recently from 5a1f6b6 to 25170f6 Compare January 24, 2020 13:33
@qryxip qryxip force-pushed the ja-all-enabled-more-tests branch from 25170f6 to 5340eed Compare January 24, 2020 13:56
@qryxip qryxip requested a review from statiolake January 25, 2020 12:52
@qryxip
Copy link
Member Author

qryxip commented Jan 25, 2020

リジェクトされたクレートをexamplesから外したのでCargo.tomlからクレートを削除(+ アップデート)する前にこちらをマージしていただければ (CIのため)

@qryxip qryxip mentioned this pull request Jan 29, 2020
@statiolake statiolake merged commit 5ba7d01 into rust-lang-ja:ja-all-enabled Jan 29, 2020
@qryxip qryxip deleted the ja-all-enabled-more-tests branch January 29, 2020 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants